
import http from '@/utils/http'


// 会员权益查看
export const memberProfit = (params) => {
    return http({
        method: 'get',
        url: `/fitasty/api/user/memberProfit`,
        params,
    })
}

// 账户管理
export const userAccountAdmin = (params) => {
    return http({
        method: 'get',
        url: `/fitasty/api/user/userAccount`,
        params,
    })
}


// 查询省市区地址
export const getLocalArea = (params) => {
    return http({
        method: 'get',
        url: `/fitasty/api/user/selectAddress`,
        params,
    })
}


// 地址管理-用户收货地址查询
export const getUserLocal = (params) => {
    return http({
        method: 'get',
        url: `/fitasty/api/user/userAddress`,
        params,
    })
}


// 根据toke获取用户信息
export const getUserInfoByToken = (params) => {
    return http({
        method: 'get',
        url: `/fitasty/api/user/userInfo`,
        params,
    })
}


// 改用户个人信息
export const updateUserInfo = (data) => {
    return http({
        method: 'post',
        url: `/fitasty/api/user/updateUser`,
        data,
    })
}



// 改用户个人信息
export const addUserAddr = (data) => {
    return http({
        method: 'post',
        url: `/fitasty/api/user/addOrUpdateAddress`,
        data,
    })
}


// 删除管理地址
export const delUserAddr = (params) => {
    return http({
        method: 'DELETE',
        url: `/fitasty/api/user/deleteAddress/${params.id}`,
        params,
    })
}


